
(function () {
    build_vertica_ele()
    build_cdh_ele()
    build_app_ele()
})()

// 生成app - 20
function build_app_ele() {
    let app_num = 25,  // 节点个数
        translateZ = 17 // z轴到中信建距离
    for (let i = 0; i <= 46; i++) {
        let cos = 360 / app_num * i
        let app_ele_str = `
        <div style="transform: rotateY(${cos}deg) translateZ(${translateZ}rem);">
          <img class="img-app" src="img/v-host-green.png" alt="">
        </div>
        `
        $(".box-app").append(app_ele_str)
    }
}

// 生成vertica - 46
function build_vertica_ele() {
    let vertica_num = 46,  // 节点个数
        translateZ = 25  // z轴到中信建距离

    for (let i = 0; i <= 46; i++) {
        let cos = 360 / vertica_num * i
        let vertica_ele_str = `
        <div style="transform: rotateY(${cos}deg) translateZ(${translateZ}rem);">
          <img class="img-vertica" src="img/host-red.png" alt="">
        </div>
        `
        $(".box-vertica").append(vertica_ele_str)
    }
}

// 生成cdh - 49
function build_cdh_ele() {
    let cdh_num = 49, // 节点个数
        translateZ = 34 // z轴到中信建距离
    for (let i = 0; i <= cdh_num; i++) {
        let cos = 360 / cdh_num * i
        let cdh_ele_str = `
        <div style="transform: rotateY(${cos}deg) translateZ(${translateZ}rem);">
          <img class="img-cdh" src="img/host-green.png" alt="">
        </div>
        `
        $(".box-cdh").append(cdh_ele_str)
    }
}



